package com.xuelang.pipeline.infrastructure.resource.converter;

import com.xuelang.pipeline.domain.resource.Dict;
import com.xuelang.pipeline.infrastructure.resource.dataobject.DictDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 字典实体与字典DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface DictToDictDOConverter {

    DictToDictDOConverter INSTANCE = Mappers.getMapper(DictToDictDOConverter.class);

    /**
     * Dict转化为DictDO
     * @param dict
     * @return
     */
    DictDO dictToDictDO(Dict dict);

    /**
     * DictDO转化为Dict
     * @param dictDO
     * @return
     */
    Dict dictDOToDict(DictDO dictDO);

}
